<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class PageContent extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//
		Schema::create("page_row", function($table)
		{
			// identifiers
			$table->increments("id");
			$table->integer("pageid");
			$table->integer("displayorder");

			// soft deletes
			$table->softDeletes();

			// timestamps
			$table->timestamps();
		});

		Schema::create("page_block", function($table)
		{
			// identifiers
			$table->increments("id");
			$table->integer("rowid");
			$table->integer("span"); // out of 12 max
			$table->integer("displayorder");
			$table->text("content")->nullable();

			// soft deletes
			$table->softDeletes();

			// timestamps
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
		Schema::drop("page_row");
		Schema::drop("page_block");
	}

}
